/**
自己内置的数据，这个的直接原因是把3dmax的obj模型数据直接做在flash里，而不需要外部加载
*/ 
package kgame5.k3d.util3d{

public class BuildinData{
	//aText是Loader3DObj读出来的txt打散成数组后的数组,这个函数是自动生成一段数组的代码，我直接拷到BuildinData里即可
	public static function GenCode(aText:Array,name:String){
		trace("///////////////////////请拷贝代码///////////////////////");
		trace("//===============生成"+name+"的模型数据===================");
		trace("public static const aText_"+name+"Data:Array=[");
		for(var i:int=0;i<aText.length;i++){
			var endSymbol:String=(i==(aText.length-1))?"];":",";
			trace("\""+aText[i]+"\""+endSymbol);
		}
		trace("////////////////////拷贝代码完毕/////////////////////");
	}
	
	//===============生成Cubic的模型数据===================
	public static const aText_CubicData:Array=[
	"# Max2Obj Version 4.0 Mar 10th, 2001",
	"#",
	"# object Box01 to come ...",
	"#",
	"v  -64.000000 -64.000000 64.000000",
	"v  64.000000 -64.000000 64.000000",
	"v  -64.000000 -64.000000 -64.000000",
	"v  64.000000 -64.000000 -64.000000",
	"v  -64.000000 64.000000 64.000000",
	"v  64.000000 64.000000 64.000000",
	"v  -64.000000 64.000000 -64.000000",
	"v  64.000000 64.000000 -64.000000",
	"# 8 vertices",
	"",
	"vt  0.000000 0.000000 0.000000",
	"vt  1.000000 0.000000 0.000000",
	"vt  0.000000 1.000000 0.000000",
	"vt  1.000000 1.000000 0.000000",
	"vt  0.000000 0.000000 0.000000",
	"vt  1.000000 0.000000 0.000000",
	"vt  0.000000 1.000000 0.000000",
	"vt  1.000000 1.000000 0.000000",
	"vt  0.000000 0.000000 0.000000",
	"vt  1.000000 0.000000 0.000000",
	"vt  0.000000 1.000000 0.000000",
	"vt  1.000000 1.000000 0.000000",
	"# 12 texture vertices",
	"",
	"vn  0.000000 -1.570796 0.000000",
	"vn  0.000000 -1.570796 0.000000",
	"vn  0.000000 -1.570796 0.000000",
	"vn  0.000000 -1.570796 0.000000",
	"vn  0.000000 1.570796 0.000000",
	"vn  0.000000 1.570796 0.000000",
	"vn  0.000000 1.570796 0.000000",
	"vn  0.000000 1.570796 0.000000",
	"# 8 vertex normals",
	"",
	"g Box01",
	"s 2",
	"f 1/10/1 3/12/3 4/11/4",
	"f 4/11/4 2/9/2 1/10/1",
	"s 4",
	"f 5/9/5 6/10/6 8/12/8",
	"f 8/12/8 7/11/7 5/9/5",
	"s 8",
	"f 1/5/1 2/6/2 6/8/6",
	"f 6/8/6 5/7/5 1/5/1",
	"s 16",
	"f 2/1/2 4/2/4 8/4/8",
	"f 8/4/8 6/3/6 2/1/2",
	"s 32",
	"f 4/5/4 3/6/3 7/8/7",
	"f 7/8/7 8/7/8 4/5/4",
	"s 64",
	"f 3/1/3 1/2/1 5/4/5",
	"f 5/4/5 7/3/7 3/1/3",
	"# 12 faces",
	"",
	"g",
	""];
}//end of class
}